﻿using Nancy.Authentication.Basic;
using System.Configuration;
namespace Famofo.AgbaraVOIP.Rest.Util
{
    public class UserValidator :IUserValidator
    {
        private string authId;
        private string authtoken;
        //private IAccountRepository _repo;
        //public UserValidator(IAccountRepository repo)
        //{
        //    _repo = repo;
        //}
        public bool Validate(string AuthId, string AuthToken)
        {
            AppSettingsReader app = new AppSettingsReader();
            authId = (string)app.GetValue("Auth_Id", authId.GetType());
            authtoken = (string)app.GetValue("Auth_Token", authtoken.GetType());
            return (AuthId == authId && AuthToken == authtoken);
        }
    }
}
